package com.uqbar.game.scene;

import java.awt.Dimension;

import com.uqbar.game.components.extra.GameOver;
import com.uqbar.game.components.extra.Win;
import com.uqbar.vainilla.DesktopGameLauncher;
import com.uqbar.vainilla.Game;

public class GameAsteroid extends Game {
	
	private InitialScene initialScene;
	private PlayScene playScene;
	private EndScene endScene;
	
	@Override
	public Dimension getDisplaySize() {
		return new Dimension(800, 600);
	}

	@Override
	public String getTitle() {
		return "ASTEROID";
	}

	@Override
	protected void initializeResources() {
		this.initialScene = new InitialScene(this);
		this.playScene = new PlayScene(this);
	}

	//Escena actual****
	
	protected void setUpScenes() {
		this.setCurrentScene(initialScene);
	}
	public void play() {
		this.setCurrentScene(playScene);
	}
	
	public void lost(){
		GameOver gameOver = new GameOver();
		endScene = new EndScene(playScene, gameOver, playScene.getSpacecraft());
		this.setCurrentScene(endScene);
	}
	
	public void win(){
		Win win = new Win();
		endScene = new EndScene(playScene, win, playScene.getSpacecraft());
		this.setCurrentScene(endScene);
	}

	//*****
	
	
	public InitialScene getInitialScene() {
		return initialScene;
	}

	public void setInitialScene(InitialScene initialScene) {
		this.initialScene = initialScene;
	}

	public PlayScene getPlayScene() {
		return playScene;
	}

	public void setPlayScene(PlayScene playScene) {
		this.playScene = playScene;
	}


	
	//STAR GAME
	public static void main(String[] args) {
		new DesktopGameLauncher(new GameAsteroid()).launch();
	}
}
